package com.bjpowernode.controller;

import com.bjpowernode.common.result.Result;
import com.bjpowernode.service.ProductService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RequiredArgsConstructor
@RestController
public class ProductController {

    private final ProductService productService;

    @GetMapping("/api/products")
    public Result getProducts() {
        return Result.OK(productService.getProductList());
    }

}
